<!DOCTYPE html>
<html>
<head><meta name="generator" content="Hexo 3.9.0">
    

    

    



    <meta charset="utf-8">
    
    
    
    <title>奔跑的蜗牛 | 虚心若愚</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    
    <meta name="theme-color" content="#3F51B5">
    
    
    <meta name="keywords" content>
    <meta property="og:type" content="website">
<meta property="og:title" content="奔跑的蜗牛">
<meta property="og:url" content="http://windynature.oschina.io/page/2/index.html">
<meta property="og:site_name" content="奔跑的蜗牛">
<meta property="og:locale" content="zh-CN">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="奔跑的蜗牛">
    
        <link rel="alternative" href="/atom.xml" title="奔跑的蜗牛" type="application/atom+xml">
    
    <link rel="shortcut icon" href="/blog/favicon.ico">
    <link rel="stylesheet" href="//unpkg.com/hexo-theme-material-indigo@1.5.2/css/style.css">
    <script>window.lazyScripts=[]</script>
</head>

<body>
    <div id="loading" class="active"></div>

    <aside id="menu"  >
  <div class="inner flex-row-vertical">
    <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="menu-off">
        <i class="icon icon-lg icon-close"></i>
    </a>
    <div class="brand-wrap" style="background-image:url(/blog/img/timg.jpg)">
      <div class="brand">
        <a href="/blog/" class="avatar waves-effect waves-circle waves-light">
          <img src="/blog/img/user2.jpg">
        </a>
        <hgroup class="introduce">
          <h5 class="nickname">windy</h5>
          <a href="mailto:windynature@163.com" title="windynature@163.com" class="mail">windynature@163.com</a>
        </hgroup>
      </div>
    </div>
    <div class="scroll-wrap flex-col">
      <ul class="nav">
        
            <li class="waves-block waves-effect">
              <a href="/blog/"  >
                <i class="icon icon-lg icon-home"></i>
                主页
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/blog/archives"  >
                <i class="icon icon-lg icon-archives"></i>
                归档
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/blog/tags"  >
                <i class="icon icon-lg icon-tags"></i>
                标签
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/blog/categories"  >
                <i class="icon icon-lg icon-th-list"></i>
                分类
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="https://github.com/WindyNature" target="_blank" >
                <i class="icon icon-lg icon-github"></i>
                Github
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="https://git.oschina.net/windynature" target="_blank" >
                <i class="icon icon-lg icon-mayun"></i>
                码云
              </a>
            </li>
        
      </ul>
    </div>
  </div>
</aside>

    <main id="main">
        <header class="top-header" id="header">
    <div class="flex-row">
        <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light on" id="menu-toggle">
          <i class="icon icon-lg icon-navicon"></i>
        </a>
        <div class="flex-col header-title ellipsis">奔跑的蜗牛</div>
        
        <div class="search-wrap" id="search-wrap">
            <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="back">
                <i class="icon icon-lg icon-chevron-left"></i>
            </a>
            <input type="text" id="key" class="search-input" autocomplete="off" placeholder="输入感兴趣的关键字">
            <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="search">
                <i class="icon icon-lg icon-search"></i>
            </a>
        </div>
        
        
        <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="menuShare">
            <i class="icon icon-lg icon-share-alt"></i>
        </a>
        
    </div>
</header>
<header class="content-header index-header">

    <div class="container fade-scale">
        <h1 class="title">奔跑的蜗牛</h1>
        <h5 class="subtitle">
            
                虚心若愚
            
        </h5>
    </div>

    

</header>

<div class="container body-wrap">

    <ul class="post-list">
    
        <li class="post-list-item fade">
            <article id="post-java/多线程/线程的生命周期及优先级"
  class="article-card article-type-post" itemprop="blogPost">

    <div class="post-meta">
        <time class="post-time" title="2017年04月12日 12:38" datetime="2017-04-12T04:38:19.000Z"  itemprop="datePublished">2017-04-12</time>

        
	<ul class="article-category-list"><li class="article-category-list-item"><a class="article-category-list-link" href="/blog/categories/多线程/">多线程</a></li></ul>



        

    </div>

    


  
    <h3 class="post-title" itemprop="name">
      <a class="post-title-link" href="/blog/2017/04/12/java/多线程/线程的生命周期及优先级/">线程的生命周期及优先级</a>
    </h3>
  




    <div class="post-content" id="post-content" itemprop="postContent">

    
        线程的生命周期线程的5中状态：新建(NEW)、就绪(Runnable)、运行(Running)、阻塞(Blocked)和死亡
线程启动后，它不可能一直霸占着CPU独自运行，所以CPU需要在多条线程之间切换，于是线程状态也会多次在运行、阻塞之间切换。
新建和就绪状态使用new关键字穿件之后就处于新建状态，此时和普通java对象一样。当对象调用start()方法后，该线程就处于就绪状态，Java...
    

        <a href="/blog/2017/04/12/java/多线程/线程的生命周期及优先级/" class="post-more waves-effect waves-button">
            阅读全文...
        </a>
    </div>
    
    <div class="post-footer">
        
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/blog/tags/生命周期/">生命周期</a></li></ul>

    </div>
    
</article>

        </li>
    
        <li class="post-list-item fade">
            <article id="post-java/多线程/创建线程的第三种方式（使用Callable和Future创建线程）"
  class="article-card article-type-post" itemprop="blogPost">

    <div class="post-meta">
        <time class="post-time" title="2017年04月12日 12:15" datetime="2017-04-12T04:15:29.000Z"  itemprop="datePublished">2017-04-12</time>

        
	<ul class="article-category-list"><li class="article-category-list-item"><a class="article-category-list-link" href="/blog/categories/多线程/">多线程</a></li></ul>



        

    </div>

    


  
    <h3 class="post-title" itemprop="name">
      <a class="post-title-link" href="/blog/2017/04/12/java/多线程/创建线程的第三种方式（使用Callable和Future创建线程）/">创建线程的第三种方式</a>
    </h3>
  




    <div class="post-content" id="post-content" itemprop="postContent">

    
        使用Callable和Future创建线程从Java5开始，Java提供了Callable接口，该接口提供了一个call()方法作为线程执行体。提供了如下功能。

call()方法可以有返回值。
call()方法可以声明抛出异常。

如何获取call()方法的返回值?Callable接口是Java 5新增的接口，而且不是Runnable接口的子接口，所以不能直接作为Thread的target...
    

        <a href="/blog/2017/04/12/java/多线程/创建线程的第三种方式（使用Callable和Future创建线程）/" class="post-more waves-effect waves-button">
            阅读全文...
        </a>
    </div>
    
    <div class="post-footer">
        
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/blog/tags/Callable/">Callable</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/blog/tags/Future/">Future</a></li></ul>

    </div>
    
</article>

        </li>
    
        <li class="post-list-item fade">
            <article id="post-java/多线程/CountDownLatch详解"
  class="article-card article-type-post" itemprop="blogPost">

    <div class="post-meta">
        <time class="post-time" title="2017年04月05日 21:40" datetime="2017-04-05T13:40:17.000Z"  itemprop="datePublished">2017-04-05</time>

        
	<ul class="article-category-list"><li class="article-category-list-item"><a class="article-category-list-link" href="/blog/categories/多线程/">多线程</a></li></ul>



        

    </div>

    


  
    <h3 class="post-title" itemprop="name">
      <a class="post-title-link" href="/blog/2017/04/05/java/多线程/CountDownLatch详解/">什么时候使用CountDownLatch</a>
    </h3>
  




    <div class="post-content" id="post-content" itemprop="postContent">

    
        原文地址译文地址：什么时候使用CountDownLatch
什么时候使用CountDownLatch正如每个Java文档所描述的那样，CountDownLatch是一个同步工具类，它允许一个或多个线程一直等待，直到其他线程的操作执行完后再执行。在Java并发中，countdownlatch的概念是一个常见的面试题，所以一定要确保你很好的理解了它。
CountDownLatch是什么Count...
    

        <a href="/blog/2017/04/05/java/多线程/CountDownLatch详解/" class="post-more waves-effect waves-button">
            阅读全文...
        </a>
    </div>
    
    <div class="post-footer">
        
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/blog/tags/CountDownLatch/">CountDownLatch</a></li></ul>

    </div>
    
</article>

        </li>
    
        <li class="post-list-item fade">
            <article id="post-java/STOMP协议详解"
  class="article-card article-type-post" itemprop="blogPost">

    <div class="post-meta">
        <time class="post-time" title="2017年04月04日 12:15" datetime="2017-04-04T04:15:24.000Z"  itemprop="datePublished">2017-04-04</time>

        
	<ul class="article-category-list"><li class="article-category-list-item"><a class="article-category-list-link" href="/blog/categories/消息队列/">消息队列</a></li></ul>



        

    </div>

    


  
    <h3 class="post-title" itemprop="name">
      <a class="post-title-link" href="/blog/2017/04/04/java/STOMP协议详解/">STOMP协议详解</a>
    </h3>
  




    <div class="post-content" id="post-content" itemprop="postContent">

    
        转自：http://blog.csdn.net/chszs/article/details/46592777
STOMP协议介绍STOMP即Simple (or Streaming) Text Orientated Messaging Protocol，简单(流)文本定向消息协议，它提供了一个可互操作的连接格式，允许STOMP客户端与任意STOMP消息代理（Broker）进行交互。STOMP...
    

        <a href="/blog/2017/04/04/java/STOMP协议详解/" class="post-more waves-effect waves-button">
            阅读全文...
        </a>
    </div>
    
    <div class="post-footer">
        
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/blog/tags/STOMP协议/">STOMP协议</a></li></ul>

    </div>
    
</article>

        </li>
    
        <li class="post-list-item fade">
            <article id="post-设计模式/装饰模式"
  class="article-card article-type-post" itemprop="blogPost">

    <div class="post-meta">
        <time class="post-time" title="2017年04月03日 11:59" datetime="2017-04-03T03:59:13.000Z"  itemprop="datePublished">2017-04-03</time>

        
	<ul class="article-category-list"><li class="article-category-list-item"><a class="article-category-list-link" href="/blog/categories/设计模式/">设计模式</a></li></ul>



        

    </div>

    


  
    <h3 class="post-title" itemprop="name">
      <a class="post-title-link" href="/blog/2017/04/03/设计模式/装饰模式/">装饰模式总结</a>
    </h3>
  




    <div class="post-content" id="post-content" itemprop="postContent">

    
        装饰模式概念装饰模式（Decorator）：动态地给一个对象添加一些额外的职责，就增加功能来说，装饰模式比生成子类更为灵活。
结构图
                
                    
                    
                
                
            


Component：是定义一个对象接口，可以...
    

        <a href="/blog/2017/04/03/设计模式/装饰模式/" class="post-more waves-effect waves-button">
            阅读全文...
        </a>
    </div>
    
    <div class="post-footer">
        
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/blog/tags/装饰模式/">装饰模式</a></li></ul>

    </div>
    
</article>

        </li>
    
        <li class="post-list-item fade">
            <article id="post-java/rabbitmq基本概念"
  class="article-card article-type-post" itemprop="blogPost">

    <div class="post-meta">
        <time class="post-time" title="2017年04月01日 21:05" datetime="2017-04-01T13:05:48.000Z"  itemprop="datePublished">2017-04-01</time>

        
	<ul class="article-category-list"><li class="article-category-list-item"><a class="article-category-list-link" href="/blog/categories/消息队列/">消息队列</a></li></ul>



        

    </div>

    


  
    <h3 class="post-title" itemprop="name">
      <a class="post-title-link" href="/blog/2017/04/01/java/rabbitmq基本概念/">RabbitMQ基本概念</a>
    </h3>
  




    <div class="post-content" id="post-content" itemprop="postContent">

    
        转自1：http://www.ostest.cn/archives/497转自2：http://blog.csdn.net/whycold/article/details/41119807
一、使用场景
两个或多个系统间通过定时任务来同步某些数据。
异构系统的不同进程间相互调用、通讯的问题。

消息服务擅长于解决多系统、异构系统间的数据交换（消息通知/通讯）问题，你也可以把它用户系统间服务的...
    

        <a href="/blog/2017/04/01/java/rabbitmq基本概念/" class="post-more waves-effect waves-button">
            阅读全文...
        </a>
    </div>
    
    <div class="post-footer">
        
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/blog/tags/RabbitMQ/">RabbitMQ</a></li></ul>

    </div>
    
</article>

        </li>
    
        <li class="post-list-item fade">
            <article id="post-java/类加载机制与反射"
  class="article-card article-type-post" itemprop="blogPost">

    <div class="post-meta">
        <time class="post-time" title="2017年02月13日 13:35" datetime="2017-02-13T05:35:47.000Z"  itemprop="datePublished">2017-02-13</time>

        
	<ul class="article-category-list"><li class="article-category-list-item"><a class="article-category-list-link" href="/blog/categories/Java基础/">Java基础</a></li></ul>



        

    </div>

    


  
    <h3 class="post-title" itemprop="name">
      <a class="post-title-link" href="/blog/2017/02/13/java/类加载机制与反射/">类加载机制和反射</a>
    </h3>
  




    <div class="post-content" id="post-content" itemprop="postContent">

    
        类的加载、连接和初始化
                
                    
                    
                
                
            





    

        <a href="/blog/2017/02/13/java/类加载机制与反射/" class="post-more waves-effect waves-button">
            阅读全文...
        </a>
    </div>
    
    <div class="post-footer">
        
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/blog/tags/反射/">反射</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/blog/tags/类加载/">类加载</a></li></ul>

    </div>
    
</article>

        </li>
    
        <li class="post-list-item fade">
            <article id="post-java/proxy"
  class="article-card article-type-post" itemprop="blogPost">

    <div class="post-meta">
        <time class="post-time" title="2017年02月12日 20:54" datetime="2017-02-12T12:54:32.000Z"  itemprop="datePublished">2017-02-12</time>

        
	<ul class="article-category-list"><li class="article-category-list-item"><a class="article-category-list-link" href="/blog/categories/设计模式/">设计模式</a></li></ul>



        

    </div>

    


  
    <h3 class="post-title" itemprop="name">
      <a class="post-title-link" href="/blog/2017/02/12/java/proxy/">代理模式</a>
    </h3>
  




    <div class="post-content" id="post-content" itemprop="postContent">

    
        代理示例来源来自大话设计模式中的一个例子。替别人做嫁衣卓贾衣喜欢娇娇，让同学戴励去给娇娇送花，然而戴励和娇娇日久生情，他们俩那个好上了。
代码被追求者SchoolGirl:
public class SchoolGirl &#123;    private String name;    public String getName() &#123;        return name;  ...
    

        <a href="/blog/2017/02/12/java/proxy/" class="post-more waves-effect waves-button">
            阅读全文...
        </a>
    </div>
    
    <div class="post-footer">
        
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/blog/tags/代理模式/">代理模式</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/blog/tags/设计模式/">设计模式</a></li></ul>

    </div>
    
</article>

        </li>
    
        <li class="post-list-item fade">
            <article id="post-java/泛型一"
  class="article-card article-type-post" itemprop="blogPost">

    <div class="post-meta">
        <time class="post-time" title="2017年02月11日 17:39" datetime="2017-02-11T09:39:57.000Z"  itemprop="datePublished">2017-02-11</time>

        
	<ul class="article-category-list"><li class="article-category-list-item"><a class="article-category-list-link" href="/blog/categories/泛型/">泛型</a></li></ul>



        

    </div>

    


  
    <h3 class="post-title" itemprop="name">
      <a class="post-title-link" href="/blog/2017/02/11/java/泛型一/">泛型初解</a>
    </h3>
  




    <div class="post-content" id="post-content" itemprop="postContent">

    
        来自疯狂Java讲义第三版，泛型章节
概念泛型:就是允许在定义类、接口、方法时使用类型形参，这个类型形参将在声明变量、创建对象、调用方法时动态地指定（即传入实际的类型参数，也可称为类型实参）。Java5中改写了集合框架中的全部接口和类，为这些接口、类增加了泛型支持，从而可以在声明集合变量、创建集合对象向时传入类型实参。例如List、ArrayList。
当创建带泛型声明的自定义类，为该类定义...
    

        <a href="/blog/2017/02/11/java/泛型一/" class="post-more waves-effect waves-button">
            阅读全文...
        </a>
    </div>
    
    <div class="post-footer">
        
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/blog/tags/泛型/">泛型</a></li></ul>

    </div>
    
</article>

        </li>
    
        <li class="post-list-item fade">
            <article id="post-工具/git远程操作详解"
  class="article-card article-type-post" itemprop="blogPost">

    <div class="post-meta">
        <time class="post-time" title="2017年01月26日 17:21" datetime="2017-01-26T09:21:28.000Z"  itemprop="datePublished">2017-01-26</time>

        
	<ul class="article-category-list"><li class="article-category-list-item"><a class="article-category-list-link" href="/blog/categories/版本管理/">版本管理</a></li></ul>



        

    </div>

    


  
    <h3 class="post-title" itemprop="name">
      <a class="post-title-link" href="/blog/2017/01/26/工具/git远程操作详解/">Git远程操作详解</a>
    </h3>
  




    <div class="post-content" id="post-content" itemprop="postContent">

    
        原文地址 
Git远程操作详解Git有很多又有，其中之一就是远程操作非常简便。本文详细介绍5个Git命令，他们的概念和用法，理解这些内容，你就会完全掌握Git远程操作。

git clone
git remote
git fetch
git pull
git push

本文针对初级用户，从最简单的讲起，但是需要读者对Git的基本用法有所了解。同时，本文覆盖了上面5个命令的几乎所有的常用用法...
    

        <a href="/blog/2017/01/26/工具/git远程操作详解/" class="post-more waves-effect waves-button">
            阅读全文...
        </a>
    </div>
    
    <div class="post-footer">
        
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/blog/tags/git/">git</a></li></ul>

    </div>
    
</article>

        </li>
    
    </ul>

    
<nav id="page-nav">
    <div class="inner">
    <a class="extend prev" rel="prev" href="/blog/">上一页</a><a class="page-number" href="/blog/">1</a><span class="page-number current">2</span><a class="page-number" href="/blog/page/3/">3</a><a class="extend next" rel="next" href="/blog/page/3/">下一页</a>
    </div>
</nav>


</div>

        <footer class="footer">
    <div class="top">
        
<p>
    <span id="busuanzi_container_site_uv" style='display:none'>
        站点总访客数：<span id="busuanzi_value_site_uv"></span>
    </span>
    <span id="busuanzi_container_site_pv" style='display:none'>
        站点总访问量：<span id="busuanzi_value_site_pv"></span>
    </span>
</p>


        <p>
            <span><a href="/atom.xml" target="_blank" class="rss" title="rss"><i class="icon icon-lg icon-rss"></i></a></span>
            <span>博客内容遵循 <a href="http://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank">知识共享 署名 - 非商业性 - 相同方式共享 4.0协议</a></span>
        </p>
    </div>
    <div class="bottom">
        <p>
            <span>Power by <a href="http://hexo.io/" target="_blank">Hexo</a> Theme <a href="https://github.com/yscoder/hexo-theme-indigo" target="_blank">indigo</a></span>
            <span>奔跑的蜗牛 &copy; 2015 - 2020</span>
        </p>
    </div>
</footer>

    </main>
    <div class="mask" id="mask"></div>
<a href="javascript:;" id="gotop" class="waves-effect waves-circle waves-light"><span class="icon icon-lg icon-chevron-up"></span></a>



<div class="global-share" id="globalShare">
    <ul class="reset share-icons">
      <li>
        <a class="weibo share-sns" target="_blank" href="http://service.weibo.com/share/share.php?url=http://windynature.oschina.io/page/2/&title=奔跑的蜗牛&pic=http://windynature.oschina.io/img/user2.jpg" data-title="微博">
          <i class="icon icon-weibo"></i>
        </a>
      </li>
      <li>
        <a class="weixin share-sns wxFab" href="javascript:;" data-title="微信">
          <i class="icon icon-weixin"></i>
        </a>
      </li>
      <li>
        <a class="qq share-sns" target="_blank" href="http://connect.qq.com/widget/shareqq/index.html?url=http://windynature.oschina.io/page/2/&title=奔跑的蜗牛&source=" data-title=" QQ">
          <i class="icon icon-qq"></i>
        </a>
      </li>
      <li>
        <a class="facebook share-sns" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=http://windynature.oschina.io/page/2/" data-title=" Facebook">
          <i class="icon icon-facebook"></i>
        </a>
      </li>
      <li>
        <a class="twitter share-sns" target="_blank" href="https://twitter.com/intent/tweet?text=奔跑的蜗牛&url=http://windynature.oschina.io/page/2/&via=http://windynature.oschina.io" data-title=" Twitter">
          <i class="icon icon-twitter"></i>
        </a>
      </li>
      <li>
        <a class="google share-sns" target="_blank" href="https://plus.google.com/share?url=http://windynature.oschina.io/page/2/" data-title=" Google+">
          <i class="icon icon-google-plus"></i>
        </a>
      </li>
    </ul>
 </div>


<div class="page-modal wx-share" id="wxShare">
    <a class="close" href="javascript:;"><i class="icon icon-close"></i></a>
    <p>扫一扫，分享到微信</p>
    <img src="" alt="微信分享二维码">
</div>




    <script src="//cdn.bootcss.com/node-waves/0.7.4/waves.min.js"></script>
<script>
var BLOG = { ROOT: '/blog/', SHARE: true, REWARD: false };



</script>

<script src="//unpkg.com/hexo-theme-material-indigo@1.5.2/js/main.min.js"></script>


<div class="search-panel" id="search-panel">
    <ul class="search-result" id="search-result"></ul>
</div>
<template id="search-tpl">
<li class="item">
    <a href="{path}" class="waves-block waves-effect">
        <div class="title ellipsis" title="{title}">{title}</div>
        <div class="flex-row flex-middle">
            <div class="tags ellipsis">
                {tags}
            </div>
            <time class="flex-col time">{date}</time>
        </div>
    </a>
</li>
</template>

<script src="//unpkg.com/hexo-theme-material-indigo@1.5.2/js/search.min.js" async></script>






<script async src="//dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"></script>





</body>
</html>
